Skip to content

feat: SRT/VTT export, title-based filenames, typed fetch errors - #5

Merged
Adeolu05 merged 2 commits into
mainfrom
feat/export-formats-and-fixes
Sep 28, 2026
Merged

Adeolu05 merged 2 commits into
mainfrom
feat/export-formats-and-fixes

Conversation

@Adeolu05

@Adeolu05 Adeolu05 commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • SRT/VTT subtitle export on web, API (/convert) and Telegram. Built from the caption segments, with overlapping auto-caption cues clipped so players don't stack lines.
  • Downloads named after the video title (e.g. Me at the zoo.pdf). Path separators and reserved characters are stripped, and non-ASCII titles get an ASCII fallback plus an RFC 5987 filename*.
  • Typed upstream errors. TranscriptFetchError replaces matching on message substrings in the API and bot. Vimeo failures (private video, no captions) now return a specific 400 instead of a generic 500. Unexpected errors are logged with a stack trace.
  • The Telegram bot no longer blocks its event loop. Formatting and PDF/DOCX generation run in a thread, and files already deleted by the TTL cleanup are regenerated instead of erroring.
  • Transcript cache pruning. Expired cache entries are deleted by the in-process cleanup loop and app.cleanup. Before this, only reads checked the TTL, so the folder grew without limit.
  • PREVIEW_CHARS is now honoured by /extract instead of a hardcoded 1500.
  • Copy fixes: the README bot-preferences claim, and a homepage mention of a JSON export that doesn't exist.

Each extract now writes two small sidecar files, <id>.segments.json and <id>.meta.json. /download rejects them (tested), and the normal file TTL cleans them up.

Also includes 23c85e1 (the YouTube IP-block error message), which was on an unmerged branch this work builds on.

Test plan

  • python -m unittest discover -s tests: 56 pass (18 new)
  • tsc --noEmit on web/
  • Real-network smoke test: extracted a YouTube video, converted to txt/pdf/docx/srt/vtt, and checked content types, filenames and cue output. An invalid video ID returns 400 TRANSCRIPT_NOT_AVAILABLE "Video is unavailable."
  • Manual: check the Telegram SRT/VTT buttons against a live bot token

Adeolu05 and others added 2 commits August 29, 2026 16:20
Cloud bots were showing an English-only caption lie for IpBlocked.
Say the server was blocked, and document that residential proxy env is required on VPS hosts.

Co-authored-by: Cursor <[email protected]>
- Export SRT and VTT subtitles (web, API /convert, Telegram); overlapping
  auto-caption cues are clipped so players don't stack lines
- Name downloads after the video title (sanitised, RFC 5987 for non-ASCII)
- Replace message-substring error classification with TranscriptFetchError
  so Vimeo failures stop surfacing as generic 500s
- Telegram: run formatting and file generation off the event loop so one
  PDF build no longer stalls every user; regenerate files removed by TTL
- Prune expired transcript cache entries in the cleanup loop and cron
- Honour PREVIEW_CHARS in the extract response
- Fix README bot-preferences claim and a homepage JSON export claim

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
transcriptflow Ready Ready Preview Sep 28, 2026 5:33pm UTC

This branch was successfully deployed

1 active deployment
Preview — c7f201b4 Deployed Sep 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant